//
//  GlobalMethod+UI.h
//  MexicoLoan
//
//  Created by WXP on 2025/2/24.
//

#import "GlobalMethod.h"

NS_ASSUME_NONNULL_BEGIN

@interface GlobalMethod (UI)

#pragma mark - 屏幕
// 灵动岛判断
+ (BOOL)deviceIsSmartIslandScreen;
// 状态栏高度
+ (CGFloat)getStatusBarHeight;
// 导航栏高度
+ (CGFloat)getNavgationBarHeight;
// 获取底部安全区域高度
+ (CGFloat)getBottomSafeAreaHeight;
// 获取tabbar高度
+ (CGFloat)getTabbarHeight;


#pragma mark - 宽度-高度
+ (CGFloat)fetchHeightFromLabel:(UILabel *)label;
+ (CGFloat)fetchHeightFromLabel:(UILabel *)label heightLimit:(CGFloat )height;
+ (CGFloat)fetchWidthFromLabel:(UILabel *)label;
+ (UIView *)getViewWithHeight:(CGFloat)height;


#pragma mark - UILabel
+ (void)setLabel:(UILabel *)label widthLimit:(CGFloat )widthLimit fontNum:(CGFloat)fontNum textColor:(UIColor *)textColor text:(NSString *)text;
+ (void)setLabel:(UILabel *)label widthLimit:(CGFloat )widthLimit isBold:(BOOL)isBold fontNum:(CGFloat)fontNum textColor:(UIColor *)textColor text:(NSString *)text;
+ (void)setLabel:(UILabel *)label widthLimit:(CGFloat )widthLimit numLines:(NSInteger)numLines
       lineSpace:(CGFloat)lineSpace fontNum:(CGFloat)fontNum textColor:(UIColor *)textColor text:(NSString *)text;
+ (void)setLabel:(UILabel *)label widthLimit:(CGFloat )widthLimit numLines:(NSInteger)numLines
       lineSpace:(CGFloat)lineSpace fontNum:(CGFloat)fontNum textColor:(UIColor *)textColor aligent:(NSTextAlignment )aligent text:(NSString *)text;
+ (void)setLabel:(UILabel *)label
      widthLimit:(CGFloat)widthLimit
        numLines:(NSInteger)numLines
       lineSpace:(CGFloat)lineSpace
          isBold:(BOOL)isBold
         fontNum:(CGFloat)fontNum
       textColor:(UIColor *)textColor
         aligent:(NSTextAlignment )aligent
            text:(NSString *)text
         bgColor:(UIColor *)color;







#pragma mark - 圆角
+ (void)setRoundView:(UIView *)iv color:(UIColor *)color numRound:(CGFloat)numRound width:(CGFloat)width;


@end

NS_ASSUME_NONNULL_END
